//
//  ZhuihaoCell.m
//  SSC
//
//  Created by 红沙尘 on 17/6/24.
//  Copyright © 2017年 红沙尘. All rights reserved.
//

#import "ZhuihaoCell.h"

@implementation ZhuihaoCell
{
    __weak IBOutlet NSLayoutConstraint *lineA;
    __weak IBOutlet NSLayoutConstraint *lineB;
    __weak IBOutlet NSLayoutConstraint *lineC;
    __weak IBOutlet NSLayoutConstraint *lineD;
    __weak IBOutlet NSLayoutConstraint *lineE;
    __weak IBOutlet NSLayoutConstraint *lineF;
    
    __weak IBOutlet UIView *topView;
    __weak IBOutlet UIView *bottomView;
    
    __weak IBOutlet UILabel *qiciLabel;
    __weak IBOutlet UILabel *beishuLabel;
    __weak IBOutlet UILabel *moneyLabel;
    
}

- (void)awakeFromNib {
    [super awakeFromNib];
    lineA.constant = LineHeight;
    lineB.constant = LineHeight;
    lineC.constant = LineHeight;
    lineD.constant = LineHeight;
    lineE.constant = LineHeight;
    lineF.constant = LineHeight;
}

- (void)loadWithDict:(NSMutableDictionary *)dict atIndex:(NSInteger)index{

    if (index == 0) {
        topView.hidden   = NO;
        qiciLabel.text   = dict[@"qici"];
        beishuLabel.text = dict[@"beishu"];
        moneyLabel.text  = dict[@"money"];
    } else {
        topView.hidden = YES;
        
        qiciLabel.text   = dict[@"qici"];
        beishuLabel.text = [NSString stringWithFormat:@"%@倍",dict[@"beishu"]];
        moneyLabel.text  = [NSString stringWithFormat:@"%@元",dict[@"money"]];
    }
}

@end
